/* 
* @Author: Turbidsoul Chen
* @Date:   2016-11-29 11:45:59
* @Last Modified by:   Turbidsoul Chen
* @Last Modified time: 2016-11-30 09:51:56
*/
import React, { Component } from 'react';
import {Provider} from 'mobx-react';
import {Router} from 'react-router';
import {getRoutes} from './routes';

export default class Root extends Component {
  static propTypes = {
    stores: React.PropTypes.object.isRequired,
    history: React.PropTypes.object.isRequired
  };
  render() {
    return (
      <Provider {...this.props.stores}>
        <Router history={this.props.history}>
          {getRoutes()}
        </Router>
      </Provider>
    );
  }
}
